package com.mcxx.modules.miniSalvation.family.service.read;

import com.mcxx.modules.miniSalvation.family.dao.read.FamilyMainHistoryReadDao;
import com.mcxx.modules.miniSalvation.family.dto.FamilyMainHistoryDTO;
import com.mcxx.modules.miniSalvation.family.entity.FamilyMainHistoryEntity;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
@TaTransactional(readOnly = true)
public class FamilyMainHistoryReadService {
    @Autowired
    private FamilyMainHistoryReadDao familyMainHistoryReadDao;


    public List<FamilyMainHistoryEntity> listAll() {
        return familyMainHistoryReadDao.listAll();
    }



    public FamilyMainHistoryEntity getById(String id) {
        return familyMainHistoryReadDao.getById(id);
    }


    public FamilyMainHistoryEntity getByOrderId(String orderId) {
        return familyMainHistoryReadDao.getByOrderId(orderId);
    }

    public FamilyMainHistoryEntity getByOrderIdState(String orderId) {
        return familyMainHistoryReadDao.getByOrderIdState(orderId);
    }



    public List<FamilyMainHistoryDTO> getFamilyHisByIdcard(List<String> idCards) {
        return familyMainHistoryReadDao.getFamilyHisByIdcard(idCards);
    }



    public String getFamilyRevenue(String orderId){
        return familyMainHistoryReadDao.getFamilyRevenue(orderId);
    }
}
